package org.ekstrabilet.stadium.beans;

import java.util.ArrayList;

/**
 * 
 * @author Maciej Koch
 *
 */
public class Row extends PhysicalObject{


	private ArrayList<Seat> seats = new ArrayList<Seat>();
	private int capacity;
	
	public int getCapacity() {
		return capacity;
	}

	public void setCapacity(int capacity) {
		this.capacity = capacity;
	}
	public ArrayList<Seat> getSeats() {
		return seats;
	}

	public void setSeats(ArrayList<Seat> Seats) {
		this.seats = Seats;
	}
	
	public Seat getSeat(int i) {
		if(i < 0 || i >= seats.size())
			return null;
		return seats.get(i);
	}

	public void addSeat(Seat s) {
		this.seats.add(s);
	}
}
